package com.hqyj.ctxp.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  商品 Entity
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("product")
public class Product {

    // 主键自增
    @TableId(value = "product_id", type = IdType.AUTO)
    private Integer productId;

    // 商品名
    @TableField("product_name")
    private String productName;

    // 商品图片
    @TableField("product_image")
    private String productImage;

    // 销量
    @TableField("sale_count")
    private Integer saleCount;

    // 库存
    @TableField("number")
    private Integer number;

    @TableField("product_price")
    private Double productPrice;

    //商品描述
    @TableField("product_des")
    private String productDes;

    // 商品种类外键
    @TableField("product_fk_category")
    private Integer productFkCategory;

    // 商品种类
    @TableField(exist = false)
    private Category category;


}
